package com.os.config;

import ch.qos.logback.classic.sift.AppenderFactoryUsingJoran;
import com.os.task.RemoveExpiredDataServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @author 风亦未止
 * @date 2023/5/6 16:11
 */
@Configuration
public class ApiInit {
    @Autowired
    private ThreadPoolExecutor threadPoolExecutor;

    @PostConstruct
    public void init(){
        RemoveExpiredDataServer removeExpiredDataServer = new RemoveExpiredDataServer();
        threadPoolExecutor.submit(removeExpiredDataServer);
    }

}
